-
Notifications
You must be signed in to change notification settings - Fork 116
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update llpc to handle new version of llvm #2799
Conversation
This comment was marked as outdated.
This comment was marked as outdated.
9c66e70
to
97cd4fd
Compare
This comment was marked as outdated.
This comment was marked as outdated.
efc8586
to
8fd9b2d
Compare
if (spvType->isTypeBool() || (spvType->isTypeVector() && spvType->getVectorComponentType()->isTypeBool())) { | ||
if (constStoreValue->getType() != storeType) { | ||
constStoreValue = ConstantFoldCastOperand(Instruction::ZExt, constStoreValue, storeType, m_m->getDataLayout()); | ||
if (!constStoreValue) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if an assert might be more appropriate here? I think the constant fold should always succeed shouldn't it unless a non-const value is passed in (in which case asserting might be the most helpful thing to do since that would be unexpected).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed to an assert.
initializer = ConstantExpr::getZExt(initializer, type); | ||
initializer = ConstantFoldCastOperand(Instruction::ZExt, initializer, type, m_m->getDataLayout()); | ||
if (!initializer) | ||
return nullptr; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as above - and even if returning nullptr is appropriate - it'll do that anyway since the next statement outside the if is a return of initializer.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed to an assert.
Test summary for commit 8fd9b2dCTS tests (Failed: 0/137941)
Ubuntu navi3x, SrdcvkUbuntu navi2x, Srdcvk |
Handle upstream llvm changes for llvm/llvm-project@e4a4122 [IR] Remove zext and sext constant expressions (#71040)
8fd9b2d
to
ca1bc71
Compare
Test summary for commit ca1bc71CTS tests (Failed: 0/137941)
Ubuntu navi3x, SrdcvkUbuntu navi2x, Srdcvk |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM too
Handle upstream llvm changes for llvm/llvm-project@e4a4122 [IR] Remove zext and sext constant expressions (#71040)